<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/vue.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
</head>

<body>
    <div id="app">
        <input type="button" value="toggle" @click="flag=!flag">
        <!-- :duration 过渡时间 单位毫秒
        如果要把入场和离场的时间分别设置 写法如下
        :duration="{enter:200,leave:400}"
        
        -->
        <!-- 写法一 -->
        <!-- <transition enter-active-class="animated bounceIn" leave-active-class="animated bounceOut">
            <h3 v-show=flag>这是一个H3</h3>
        </transition> -->
        <!-- 写法二 -->
        <transition enter-active-class="bounceIn" leave-active-class="bounceOut" :duration="200">
            <h3 v-show=flag class="animated">这是一个H3</h3>
        </transition>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                flag: true
            },
            methods: {}
        });
    </script>
</body>

</html>